package com.cssp.lof.dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.cssp.lof.model.LostInfo;

public class LostInfoDao extends SqlMapClientDaoSupport
	{
		@SuppressWarnings("unchecked")
		public List<LostInfo> getAllLostInfo()
			{
				return getSqlMapClientTemplate().queryForList("lostInfo.getAll");
			}

		public LostInfo getLostInfoById(String id)
			{
				return (LostInfo) getSqlMapClientTemplate().queryForObject("lostInfo.getLostInfoById", id);
			}

		public void addLostInfo(LostInfo lostInfo)
			{
				getSqlMapClientTemplate().insert("lostInfo.addLostInfo", lostInfo);
			}

		public void updateLostInfo(LostInfo lostInfo)
			{
				getSqlMapClientTemplate().update("lostInfo.updateLostInfo", lostInfo);
			}

		public void deleteLostInfo(String id)
			{
				getSqlMapClientTemplate().delete("lostInfo.deleteLostInfo", id);
			}
	}
